package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.DatBasetowerMapper;
import com.rzl.expense.expense.domain.DatBasetower;
import com.rzl.expense.expense.service.IDatBasetowerService;

/**
 * 综资铁塔Service业务层处理
 * 
 * @author expense
 * @date 2024-11-30
 */
@Service
public class DatBasetowerServiceImpl implements IDatBasetowerService 
{
    @Autowired
    private DatBasetowerMapper datBasetowerMapper;

    /**
     * 查询综资铁塔
     * 
     * @param towerId 综资铁塔主键
     * @return 综资铁塔
     */
    @Override
    public DatBasetower selectDatBasetowerByTowerId(String towerId)
    {
        return datBasetowerMapper.selectDatBasetowerByTowerId(towerId);
    }

    /**
     * 查询综资铁塔列表
     * 
     * @param datBasetower 综资铁塔
     * @return 综资铁塔
     */
    @Override
    public List<DatBasetower> selectDatBasetowerList(DatBasetower datBasetower)
    {
        return datBasetowerMapper.selectDatBasetowerList(datBasetower);
    }

    /**
     * 新增综资铁塔
     * 
     * @param datBasetower 综资铁塔
     * @return 结果
     */
    @Override
    public int insertDatBasetower(DatBasetower datBasetower)
    {
        datBasetower.setCreateTime(DateUtils.getNowDate());
        return datBasetowerMapper.insertDatBasetower(datBasetower);
    }

    /**
     * 修改综资铁塔
     * 
     * @param datBasetower 综资铁塔
     * @return 结果
     */
    @Override
    public int updateDatBasetower(DatBasetower datBasetower)
    {
        datBasetower.setUpdateTime(DateUtils.getNowDate());
        return datBasetowerMapper.updateDatBasetower(datBasetower);
    }

    /**
     * 批量删除综资铁塔
     * 
     * @param towerIds 需要删除的综资铁塔主键
     * @return 结果
     */
    @Override
    public int deleteDatBasetowerByTowerIds(String[] towerIds)
    {
        return datBasetowerMapper.deleteDatBasetowerByTowerIds(towerIds);
    }

    /**
     * 删除综资铁塔信息
     * 
     * @param towerId 综资铁塔主键
     * @return 结果
     */
    @Override
    public int deleteDatBasetower(String[] currentDate)
    {
        return datBasetowerMapper.deleteDatBasetower(currentDate[0],currentDate[1]);
    }




    @Override
    public void batchDatBasetower(List<DatBasetower> list)
    {

         datBasetowerMapper.batchDatBasetower(list);
    }


}
